Optimal. Leaf size=20 \[ i x-i \tan (x)-\log (\sin (x))+\log (\tan (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0411211, antiderivative size = 20, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {3516, 44} \[ i x-i \tan (x)-\log (\sin (x))+\log (\tan (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3516
Rule 44
Rubi steps
\begin{align*} \int \frac{\sec ^2(x)}{i+\cot (x)} \, dx &=-\operatorname{Subst}\left (\int \frac{1}{x^2 (i+x)} \, dx,x,\cot (x)\right )\\ &=-\operatorname{Subst}\left (\int \left (\frac{1}{-i-x}-\frac{i}{x^2}+\frac{1}{x}\right ) \, dx,x,\cot (x)\right )\\ &=i x-\log (\sin (x))+\log (\tan (x))-i \tan (x)\\ \end{align*}
Mathematica [A] time = 0.0327411, size = 17, normalized size = 0.85 \[ i (x-\tan (x)+i \log (\cos (x))) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.032, size = 13, normalized size = 0.7 \begin{align*} -i\tan \left ( x \right ) +\ln \left ( \tan \left ( x \right ) -i \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.27357, size = 16, normalized size = 0.8 \begin{align*} \log \left (i \, \tan \left (x\right ) + 1\right ) - i \, \tan \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{{\left ({\left (e^{\left (2 i \, x\right )} + 1\right )} e^{\left (2 i \, x\right )}{\rm integral}\left (-\frac{2 i \, e^{\left (-2 i \, x\right )}}{e^{\left (2 i \, x\right )} + 1}, x\right ) + e^{\left (2 i \, x\right )} - 1\right )} e^{\left (-2 i \, x\right )}}{e^{\left (2 i \, x\right )} + 1} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sec ^{2}{\left (x \right )}}{\cot{\left (x \right )} + i}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.25198, size = 74, normalized size = 3.7 \begin{align*} \frac{\tan \left (\frac{1}{2} \, x\right )^{2} + 2 i \, \tan \left (\frac{1}{2} \, x\right ) - 1}{\tan \left (\frac{1}{2} \, x\right )^{2} - 1} + 2 \, \log \left (\tan \left (\frac{1}{2} \, x\right ) - i\right ) - \log \left ({\left | \tan \left (\frac{1}{2} \, x\right ) + 1 \right |}\right ) - \log \left ({\left | \tan \left (\frac{1}{2} \, x\right ) - 1 \right |}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]